package Day01;

public class Demo5 {

	public static void main(String[] args) {
		int m []  = {19, 28, 37, 46, 50};
		int n []  = {50, 46, 37, 28, 19};
		swap(m,n);
	}
	public static int[] swap(int m[],int n[]){
		n = new int [5];
		int o=n.length-1;
		for (int i = 0; i < n.length; i++) {
			n[i]=m[o];
			o=o-1;
		}
		System.out.print("n={");
		for (int i = 0; i < n.length; i++) {
	 		System.out.print(n[i]+",");
			
		}

	
		System.out.println("}");	
		return n;
	
	}
}